package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.PackageMapper;
import com.ruoyi.system.domain.Packages;
import com.ruoyi.system.service.IPackageService;

/**
 * 套餐类型Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-07-09
 */
@Service
public class PackageServiceImpl implements IPackageService 
{
    @Autowired
    private PackageMapper packageMapper;

    /**
     * 查询套餐类型
     * 
     * @param pId 套餐类型ID
     * @return 套餐类型
     */
    @Override
    public Packages selectPackageById(Long pId)
    {
        return packageMapper.selectPackageById(pId);
    }

    /**
     * 查询套餐类型列表
     * 
     * @param package 套餐类型
     * @return 套餐类型
     */
    @Override
    public List<Packages> selectPackageList(Packages packages)
    {
        return packageMapper.selectPackageList(packages);
    }

    /**
     * 新增套餐类型
     * 
     * @param packages 套餐类型
     * @return 结果
     */
    @Override
    public int insertPackage(Packages packages)
    {
        return packageMapper.insertPackage(packages);
    }

    /**
     * 修改套餐类型
     * 
     * @param packages 套餐类型
     * @return 结果
     */
    @Override
    public int updatePackage(Packages packages)
    {
        return packageMapper.updatePackage(packages);
    }

    /**
     * 批量删除套餐类型
     * 
     * @param pIds 需要删除的套餐类型ID
     * @return 结果
     */
    @Override
    public int deletePackageByIds(Long[] pIds)
    {
        return packageMapper.deletePackageByIds(pIds);
    }

    /**
     * 删除套餐类型信息
     * 
     * @param pId 套餐类型ID
     * @return 结果
     */
    @Override
    public int deletePackageById(Long pId)
    {
        return packageMapper.deletePackageById(pId);
    }
}
